package swingxrcp.framework.model.environment;

import swingxrcp.framework.server.environment.Application;
import swingxrcp.framework.server.environment.Module;

/**
 * 上下文环境信息
 *
 * @author liangfei
 *
 */
public class Environment {

	public Environment(Application applicationContext,
			Module moduleContext, UserContext userContext,
			ServerSource server, ClientSource client) {
		this.application = applicationContext;
		this.module = moduleContext;
		this.userContext = userContext;
		this.server = server;
		this.client = client;
	}

	private Application application;

	/**
	 * 获取当前应用信息
	 *
	 * @return 当前应用信息
	 */
	public Application getCurrentApplication() {
		return application;
	}

	private Module module;

	/**
	 * 获取当前模块信息
	 *
	 * @return 当前模块信息
	 */
	public Module getCurrentModule() {
		return module;
	}

	private UserContext userContext;

	/**
	 * 获取当前用户信息
	 *
	 * @return 当前用户信息
	 */
	public UserContext getCurrentUserContext() {
		return userContext;
	}

	private ServerSource server;

	/**
	 * 获取当前服务器信息
	 *
	 * @return 当前服务器信息
	 */
	public ServerSource getCurrentServer() {
		return server;
	}

	private ClientSource client;

	/**
	 * 获取当前客户端信息
	 *
	 * @return 当前客户端信息
	 */
	public ClientSource getCurrentClient() {
		return client;
	}

}
